$(document)
		.ready(
				function() {
					console.log("first ready");
					oTable = $('#example')
							.dataTable({
										// "sDom" : 'C<"clear">lfrtip',
										// "sDom" : 'T<"clear">lfrtip',
										// "sDom" :
										// "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
										"sDom" : "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
										"oColVis" : {
											"activate" : "mouseover",
											"buttonText" : "Change columns",
											"bRestore" : true,
											"sAlign" : "left"
										},
										// "fnDrawCallback": function (o) {

										// var nColVis = $('div.ColVis',
										// o.nTableWrapper)[0];
										// nColVis.style.width = 100+"px";
										// },

										"sScrollX" : "100%",
										"sScrollXInner" : "200%",
										"bScrollCollapse" : true,
										"bPaginate" : true,
										"bLengthChange" : true,
										"bFilter" : true,
										"bSort" : true,
										"bSortable" : true,
										"bSearchable" : true,
										"bInfo" : false,
										"bAutoWidth" : true,
										"bProcessing" : true,
										"bServerSide" : false,
										"oTableTools" : {
											"sRowSelect" : "multi",
											"aButtons" : [
											// "copy",
											// "print",
											// {
											// "sExtends": "collection",
											// "sButtonText": "Save",
											// "aButtons": [ "csv", "xls", "pdf"
											// ]
											// },
											{
												"sExtends" : "editor_create",
												"editor" : editor
											}, {
												"sExtends" : "editor_edit",
												"editor" : editor
											}, {
												"sExtends" : "editor_remove",
												"editor" : editor
											} ]
										},
										// "sAjaxSource" :
										// 'resources/mocks/arrays.txt',
										"sAjaxSource" : 'promotions',
										"bStateSave" : false,

										"aoColumns" : [ {
											"sTitle" : "ID",
											"mData" : "ID"
										}, {
											"sTitle" : "Calendar Week",
											"mData" : "CALENDAR_WEEK",
										}, {
											"sTitle" : "Day",
											"mData" : "DAY_OF_PROMOTION",
										}, {
											"sTitle" : "Start Date",
											"mData" : "START_OF_PROMOTION",
										}, {
											"sTitle" : "End Date",
											"mData" : "END_OF_PROMOTION",
										}, {
											"sTitle" : "Action",
											"mData" : "ACTION_OF_PROMOTION",
											"sDefaultContent": ""
										}, {
											"sTitle" : "Number of Action",
											"mData" : "ACTION_NUMBER",
											"sDefaultContent": ""
										}, {
											"sTitle" : "EANs",
											"mData" : "EANS_FOR_ACTION",
											"sDefaultContent": ""
										}, {
											"sTitle" : "Extras",
											"mData" : "EXTRAS",
											"sDefaultContent" : ""
										}, {
											"sTitle" : "Pay off",
											"mData" : "PAY_OFF",
											"sDefaultContent" : ""
										} ],
									});

				});
